Google News
logo
ReactJS - Quiz(MCQ)
How do you fix the syntax error that results from running this code?
const person =(firstName, lastName) =>
       {
            first: firstName,
            last: lastName
        }
console.log(person("jhon", "Wolson"))
A)
Wrap the object in parentheses.
B)
Call the function from another file.
C)
Replace the with an array
D)
Add a return statement before the first curly brace.

Correct Answer :   Wrap the object in parentheses.